package userimage;

import userimage.page.Page;
import userimage.texteditor.TextEditor;

import java.util.ArrayList;
import java.util.List;

public class EditorManager {

    List<TextEditor> editorList = new ArrayList<>();

    Page editorpage;
    WorkArea workarea;

    public EditorManager(Page ep, WorkArea wa) {
        super();
        this.editorpage = ep;
        this.workarea = wa;
    }

    public void switchToEditor(TextEditor editor) {
        editorpage.setUserArea(editor);
    }

    public void addEditor(TextEditor editor) {
        editorList.add(editor);
        switchToEditor(editor);
    }

}
